/** 该文件仅存放用户评论模块相关的接口API */
import myaxios from "../MyAxios";
// 引入路径前缀
import BASEURL from '../BaseUrl' 
const {BMDURL} = BASEURL

const commentApi = {
   /**
   * 新增分享评论
   * @param {Object}} params  {uid,content,time，sid}
   */
   commentAddShare(params){
    return myaxios.post(BMDURL+"/v1/comment/add_share", params)
  },

     /**
   * 新增课程评论
   * @param {Object}} params  {uid,content,time}
   */
     commentAddCourse(params){
      return myaxios.post(BMDURL+"/v1/comment/add_course", params)
    },

  /**
   * 通过sid查询评论
   * @param {Object}} params  {sid}
   */
  commentByShareId(params){
    return myaxios.get(BMDURL+"/v1/comment/share", params)
  },

    /**
   * 通过pid查询评论
   * @param {Object}} params  {pid}
   */
    commentByCourseId(params){
      return myaxios.get(BMDURL+"/v1/comment/course", params)
    },

  /**
   * 删除评论
   * @param {Object}} params  {id}
   */
  commentDelete(params){
    return myaxios.post(BMDURL+"/v1/comment/delete", params)
  },

  /**
   * 查询所有评论
   * @param {Object}} params  {}
   */
  commentAll(params){
    return myaxios.get(BMDURL+"/v1/comment/all", params)
  },
  

}

export default commentApi;